<template>
	<view>
		<view class="news-detail-title-box mg-lr-25">
			<text class="text-30-0f0f0f">{{newsDetailData.title}}</text>
		</view>
		<view class="flex-ac mg-lr-25 mg-t-20">
			<text>{{newsDetailData.source}}</text>
			<text class="">{{newsDetailData.createTime}}</text>
		</view>
		
		<view class="detail-centent-box mg-lr-25">
			<uParse :content="newsDetailData.content"></uParse>
		</view>
		
		
	</view>
</template>

<script>
	import uParse from '@/components/gaoyia-parse/parse.vue'
	export default {
		components:{
			uParse
		},
		data() {
			return {
				newsDetailData:{},
				 html: '<div>Hello World!</div>'
			}
		},
		onLoad(id) {
			// uni.setNavigationBarTitle({
			// 	title:id
			// })
			let newsid = id.id;
			console.log(newsid)
			
			this._initSendNews(newsid)
			
		},
		methods: {
			async _initSendNews(id) {
				let newsDetail = await this.$myRequest({
					url: '/rural-revitalization/rtc/industryDetails/queryById',
					method: "GET",
					data:{
						id:id
					}
				})
				// console.log(newsDetail)
				if(newsDetail.code == 200){
					this.newsDetailData = newsDetail.result;
				}else{
					console.log(newsDetail)
				}
			},
		}
	}
</script>

<style>
	.news-detail-title-box{
		margin-top: 10rpx;
	}
	.detail-centent-box{
		
	}

</style>
